From ca9761370a111c8358999559e76a3b75c52c3fc8 Mon Sep 17 00:00:00 2001 From: Ivan Chashkin Date: Fri, 21 Feb 2025 22:20:54 +0300 Subject: [PATCH] luci-proto-yggdrasil: update yggdrasil.js for 0.5.7+ version rename latency_ms and add new protocols to validate functions https://yggdrasil-network.github.io/configurationref.html Signed-off-by: Ivan Chashkin --- .../htdocs/luci-static/resources/protocol/yggdrasil.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/protocols/luci-proto-yggdrasil/htdocs/luci-static/resources/protocol/yggdrasil.js b/protocols/luci-proto-yggdrasil/htdocs/luci-static/resources/protocol/yggdrasil.js index 3766bb1b48..4cfa62583f 100644 --- a/protocols/luci-proto-yggdrasil/htdocs/luci-static/resources/protocol/yggdrasil.js +++ b/protocols/luci-proto-yggdrasil/htdocs/luci-static/resources/protocol/yggdrasil.js @@ -33,13 +33,13 @@ function validateYggdrasilListenUri(section_id,value) { if (value.length == 0) { return true; }; - if (!value.match(/^(tls|tcp|unix|quic):\/\//)) + if (!value.match(/^(tls|tcp|quic|unix|ws):\/\//)) return _('Unsupported URI scheme in %s').format(value); return true; }; function validateYggdrasilPeerUri(section_id,value) { - if (!value.match(/^(tls|tcp|unix|quic|socks|sockstls):\/\//)) + if (!value.match(/^(tls|tcp|quic|socks|sockstls|unix|ws|wss):\/\//)) return _('URI scheme %s not supported').format(value); return true; }; @@ -98,7 +98,7 @@ function updateActivePeers(ifname) { cell = row.insertCell(-1) cell.className = "td" - cell.textContent = '%.2f ms'.format(peer.latency_ms / 10**6); + cell.textContent = '%.2f ms'.format(peer.latency / 10**6); cell = row.insertCell(-1) cell.className = "td" -- 2.30.2